use SilenthinkExtra
go

if OBJECT_ID('[Register.Log]') is not null
drop table [Register.Log]
go

create table [Register.Log](
[Id] uniqueidentifier not null,
[Origin] int not null,
[UserName] nvarchar(50) not null,
[Password] varchar(255) not null,
[UserAgent] nvarchar(50),
[Browser] nvarchar(50),
[IpAddress] varchar(20),
[UrlReferrer] nvarchar(500),
[TraceCode] nvarchar(50),
[CreatedBy] nvarchar(50),
[CreatedOn] datetime not null
)
go
ALTER TABLE [Register.Log] ADD CONSTRAINT [Df.Register.Log.Origin] DEFAULT (0) FOR Origin

ALTER TABLE [Register.Log] ADD CONSTRAINT [Df.Register.Log.CreatedOn] DEFAULT (getdate()) FOR CreatedOn
go

if OBJECT_ID('[Verification.Sms]') is not null
drop table [Verification.Sms]
go

create table [Verification.Sms](
Id uniqueidentifier not null,
UserId bigint not null,
Category int not null,
Mobile varchar(20) not null,
SmsCode varchar(20) not null,
CreatedBy varchar(50) not null,
CreatedOn datetime not null
)
go
ALTER TABLE [Verification.Sms] ADD CONSTRAINT [Df.Verification.Sms.CreatedOn] DEFAULT (getdate()) FOR CreatedOn
go

if OBJECT_ID('[Verification.Email]') is not null
drop table [Verification.Email]
go

create table [Verification.Email](
[Id] uniqueidentifier not null,
[UserId] bigint not null,
[Category] int not null,
[Email] varchar(200) not null,
[AuthCode] varchar(2048) not null,
[CreatedBy] varchar(50) not null,
[CreatedOn] datetime not null
)
go
ALTER TABLE [Verification.Email] ADD CONSTRAINT [Df.Verification.Email.CreatedOn] DEFAULT (getdate()) FOR CreatedOn
go